/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pasta;

import java.io.IOException;
import java.util.ArrayList;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.List;

import rice.p2p.commonapi.Id;


/**
 *
 * @author Junior
 */
public class Music {

	private String title, artist, album, gender;
	private List<Id> fragments;

	Music (String title, String artist, String album, String gender) {
		setTitle (title);
		setArtist (artist);
		setAlbum (album);
		setGender (gender);

		setFragmentsIds(new ArrayList<Id> ());
	}



        Music() throws IOException {
            fragments = new ArrayList<Id>();

            System.out.print("Title: ");
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            setTitle(br.readLine());

            System.out.print("Artist: ");
            br = new BufferedReader(new InputStreamReader(System.in));
            setArtist(br.readLine());

            System.out.print("Album: ");
            br = new BufferedReader(new InputStreamReader(System.in));
            setAlbum(br.readLine());

            System.out.print("Gender: ");
            br = new BufferedReader(new InputStreamReader(System.in));
            setGender(br.readLine());



        }



	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param artist the artist to set
	 */
	public void setArtist(String artist) {
		this.artist = artist;
	}

	/**
	 * @return the artist
	 */
	public String getArtist() {
		return artist;
	}

	/**
	 * @param album the album to set
	 */
	public void setAlbum(String album) {
		this.album = album;
	}

	/**
	 * @return the album
	 */
	public String getAlbum() {
		return album;
	}


	/**
	 * @param gender the gender to set
	 */
	public void setGender(String gender) {
		this.gender = gender;
	}

	/**
	 * @return the gender
	 */
	public String getGender() {
		return gender;
	}

	/**
	 * @param fragments the fragments to set
	 */
	public void setFragmentsIds(ArrayList<Id> fragments) {
		this.fragments = fragments;
	}


	/**
	 * @return the fragments
	 */
	public List<Id> getFragmentsIds() {
		return fragments;
	}

	/**
	 * @param fragment the fragment to add
	 */
	public void addFragmentIds (Id fragmentId) {
		fragments.add(fragmentId);
	}
        
        @Override
        public String toString () {
           String music = title + artist + album + gender;
           return music;
        }

        public String[] print() {
            String[] music = {title, artist, album, gender};
            return music;
        }
        

}
